Skip to content

Conversation

@esguerrat
Copy link
Contributor

Brief Summary of Changes

What Does This PR Address?

  • GitHub issue (Add reference - #XX)
  • Refactoring
  • New feature
  • Bug fix
  • Adds more tests

Are Tests Included?

  • Yes
  • No

Reviewer, Please Note:

@esguerrat esguerrat self-assigned this Nov 21, 2025
Copy link
Contributor

@cloudinary-pkoniu cloudinary-pkoniu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current implementation is a breaking change, it cannot be added to a minor release.

function user(userId: string, options?: ProvisioningApiOptions, callback?: ResponseCallback): Promise<any>;

function users(pending: boolean, userIds?: string[], prefix?: string, subAccountId?: string, options?: ProvisioningApiOptions, callback?: ResponseCallback): Promise<any>;
function users(pending: boolean, userIds?: string[], prefix?: string, subAccountId?: string, lastLogin?: boolean, fromDate?: Date | string, toDate?: Date | string, options?: ProvisioningApiOptions, callback?: ResponseCallback): Promise<any>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move lastLogin, fromDate and toDate to options object.
Also, extend the typescript definition of the options object, so it includes those fields and its types.
Keep in mind that it should be backwards compatible, so we aim towards extending the contract rather then changing it. Options could look like this:

function users(..., options?: ProvisioningApiOptions | { lastLogin?: boolean; fromDate?: Date | string; toDate?: Date | string })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants